[tools/shoestring]: Shortened command and subcommand autocompletion#1439
[tools/shoestring]: Shortened command and subcommand autocompletion#1439ccHarvestasya wants to merge 10 commits intosymbol:devfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1439 +/- ##
==========================================
+ Coverage 98.28% 99.21% +0.93%
==========================================
Files 164 159 -5
Lines 6770 6642 -128
Branches 143 143
==========================================
- Hits 6654 6590 -64
+ Misses 116 52 -64
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
|
||
| [tool.poetry.scripts] | ||
| shoestring = "shoestring.__main__:entry_point" | ||
| shoestring-wizard = "shoestring.wizard.__main__:entry_point" |
There was a problem hiding this comment.
Can you add tests for this?
There was a problem hiding this comment.
It is possible to run tests that go through each entry point, so I’ve added them.
However, these are just tests that pass through the entry points.
Do you think it would be better to include some assertions?
There was a problem hiding this comment.
Thanks. Those tests are fine.
Initially, I was thinking of installing a Shoestring(pip install -e .) to verify that the shoestring command runs.
| @@ -1,4 +1,5 @@ | |||
| aiohttp~=3.12.6 | |||
| argcomplete~=3.6.2 | |||
There was a problem hiding this comment.
This seems to only work with a specific shell? 🤔
You’re using bash or zsh as your shell
There was a problem hiding this comment.
-
It needs to be executable simply as
shoestring.
(This has already been addressed viatool.poetry.scripts.) -
To enable autocompletion, you need to run
eval "$(register-python-argcomplete shoestring)"(or add it to your.bashrcto enable it permanently).
Since an extra command is required, it ends up feeling like a hidden feature 😅
There was a problem hiding this comment.
-
Yes, but I was wondering if
argcompleteonly supports bash or zsh shell -
Yes, will need to update the README on how to enable autocompletion
There was a problem hiding this comment.
-
It looks like
argcompleteonly supports Bash and Zsh.
Are there any other shells we should consider supporting? For example, PowerShell?
If you have suggestions for other shells worth supporting, let me know — I’ll look into whether we can support them. -
I'll add instructions for enabling autocomplete to the README later.
There was a problem hiding this comment.
- Adding the list of supported shells to the README is sufficient.
There was a problem hiding this comment.
OK, I'll add it to the README later.
Enable shell autocompletion using: eval "$(register-python-argcomplete shoestring)"
b0cde07 to
dfe6e29
Compare
f18d312 to
3a736e0
Compare
task: add NemConnector for POST local/chain/blocks-after and local/block/at
task: add Block model
task: add mapping transaction, TransferTransaction, ImportanceTransferTransaction, and ConvertAccountToMultisig
task: refactor the transaction model
task: add new model NamespaceRegistrationTransaction, MosaicDefinitionTransaction, and MosaicSupplyChangeTransaction
task: refactor and support more transactions
task: add new model MultisigTransaction and CosignSignatureTransaction
task: refactor the transaction model and the NEM connector
task: rename transaction model
task: add UnknownTransactionType exception
---
Signed-off-by: wayonb <wayon@symbol.dev>
Co-authored-by: Anthony Law <anthony@symbol.dev>
Problem
python3 -mSolution
python3 -margcomplete